/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aptech.childcare.entities;

import com.aptech.childcare.components.PropertyIndex;
import java.sql.Date;

/**
 *
 * @author BaoTien
 */
public class Child implements PropertyIndex {

    private int childID = -1;
    private int classID;
    private String lastName;
    private String firstName;
    private String sex;
    private String pathImage;
    private Date birthday;
    private String address;
    private String currentMedication;
    private String pasrIllness;
    private String doctorName;
    private String doctorPhone;
    private String parentName;
    private String parentWorkNumber;
    private String parentPhone;
    private String parentEmail;
    private String nextOfKinContact;
    private Date registrationDate;
    private Date dateReceived;
    private String lastError;

    /**
     * @return the childID
     */
    public int getChildID() {
        return childID;
    }

    /**
     * @param childID the childID to set
     */
    public void setChildID(int childID) {
        this.childID = childID;
    }

    /**
     * @return the classID
     */
    public int getClassID() {
        return classID;
    }

    /**
     * @param classID the classID to set
     */
    public void setClassID(int classID) {
        this.classID = classID;
    }

    /**
     * @return the lastName
     */
    public String getLastName() {
        return lastName;
    }

    /**
     * @param lastName the lastName to set
     */
    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    /**
     * @return the firdtName
     */
    public String getFirstName() {
        return firstName;
    }

    /**
     * @param firdtName the firdtName to set
     */
    public void setFirstName(String firdtName) {
        this.firstName = firdtName;
    }

    /**
     * @return the sex
     */
    public String getSex() {
        return sex;
    }

    /**
     * @param sex the sex to set
     */
    public void setSex(String sex) {
        this.sex = sex;
    }

    /**
     * @return the pathImage
     */
    public String getPathImage() {
        return pathImage;
    }

    /**
     * @param pathImage the pathImage to set
     */
    public void setPathImage(String pathImage) {
        this.pathImage = pathImage;
    }

    /**
     * @return the birthday
     */
    public Date getBirthday() {
        return birthday;
    }

    /**
     * @param birthday the birthday to set
     */
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    /**
     * @return the address
     */
    public String getAddress() {
        return address;
    }

    /**
     * @param address the address to set
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * @return the currentMedication
     */
    public String getCurrentMedication() {
        return currentMedication;
    }

    /**
     * @param currentMedication the currentMedication to set
     */
    public void setCurrentMedication(String currentMedication) {
        this.currentMedication = currentMedication;
    }

    /**
     * @return the pasrIllness
     */
    public String getPasrIllness() {
        return pasrIllness;
    }

    /**
     * @param pasrIllness the pasrIllness to set
     */
    public void setPasrIllness(String pasrIllness) {
        this.pasrIllness = pasrIllness;
    }

    /**
     * @return the doctorName
     */
    public String getDoctorName() {
        return doctorName;
    }

    /**
     * @param doctorName the doctorName to set
     */
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }

    /**
     * @return the doctorPhone
     */
    public String getDoctorPhone() {
        return doctorPhone;
    }

    /**
     * @param doctorPhone the doctorPhone to set
     */
    public void setDoctorPhone(String doctorPhone) {
        this.doctorPhone = doctorPhone;
    }

    /**
     * @return the parentName
     */
    public String getParentName() {
        return parentName;
    }

    /**
     * @param parentName the parentName to set
     */
    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    /**
     * @return the parentWorkNumber
     */
    public String getParentWorkNumber() {
        return parentWorkNumber;
    }

    /**
     * @param parentWorkNumber the parentWorkNumber to set
     */
    public void setParentWorkNumber(String parentWorkNumber) {
        this.parentWorkNumber = parentWorkNumber;
    }

    /**
     * @return the parentPhone
     */
    public String getParentPhone() {
        return parentPhone;
    }

    /**
     * @param parentPhone the parentPhone to set
     */
    public void setParentPhone(String parentPhone) {
        this.parentPhone = parentPhone;
    }

    /**
     * @return the parentEmail
     */
    public String getParentEmail() {
        return parentEmail;
    }

    /**
     * @param parentEmail the parentEmail to set
     */
    public void setParentEmail(String parentEmail) {
        this.parentEmail = parentEmail;
    }

    /**
     * @return the nextOfKinContact
     */
    public String getNextOfKinContact() {
        return nextOfKinContact;
    }

    /**
     * @param nextOfKinContact the nextOfKinContact to set
     */
    public void setNextOfKinContact(String nextOfKinContact) {
        this.nextOfKinContact = nextOfKinContact;
    }

    /**
     * @return the registrationDate
     */
    public Date getRegistrationDate() {
        return registrationDate;
    }

    /**
     * @param registrationDate the registrationDate to set
     */
    public void setRegistrationDate(Date registrationDate) {
        this.registrationDate = registrationDate;
    }

    /**
     * @return the dateReceived
     */
    public Date getDateReceived() {
        return dateReceived;
    }

    /**
     * @param dateReceived the dateReceived to set
     */
    public void setDateReceived(Date dateReceived) {
        this.dateReceived = dateReceived;
    }

    /**
     * @return the lastError
     */
    public String getLastError() {
        return lastError;
    }

    /**
     * @param lastError the lastError to set
     */
    public void setLastError(String lastError) {
        this.lastError = lastError;
    }

    public Object getPropertyValue(int index) {
        String value = "";
        switch (index) {
            case 1:
                value = String.valueOf(this.getChildID());
                break;
            case 2:
                value = this.getLastName();
                break;
            case 3:
                value = this.getFirstName();
                break;
            case 4:
                value = this.getSex();
                break;
            case 5:
                value = this.getPathImage();
                break;
            case 6:
                value = String.valueOf(this.getBirthday());
                break;
            case 7:
                value = this.getAddress();
                break;
            case 8:
                value = this.getCurrentMedication();
                break;
            case 9:
                value = this.getDoctorName();
                break;
            case 10:
                value = this.getDoctorPhone();
                break;
            case 11:
                value = this.getParentName();
                break;
            case 12:
                value = this.getParentPhone();
                break;
            case 13:
                value = this.getParentWorkNumber();
                break;
            case 14:
                value = this.getParentEmail();
                break;
            case 15:
                value = this.getPasrIllness();
                break;
            case 16:
                value = this.getNextOfKinContact();
                break;
            case 17:
                value = String.valueOf(this.getRegistrationDate());
                break;
            case 18:
                value = String.valueOf(this.getDateReceived());
                break;
            case 19:
                value = String.valueOf(this.getClassID());
                break;


        }
        return value;
    }

    public void setPropertyValue(int index, Object value) {
    }

    public Class getPropertyClass(int index) {
        return String.class;
    }
}
